<template>
	<view class="statistics">
		<u-navbar title="评测结果" title-size="36" :border-bottom="false" title-color="#fff" :background="{ background: '#00A1F2' }" back-icon-color="#FFFFFF"></u-navbar>
		<view class="resultInfo">
			<u-grid :col="2" :border="false">
				<u-grid-item>
					<view class="title" style="border-right: 1px solid #99d9fa;">{{ chillingRequirementTypeDesc }}&nbsp;</view>
					<view class="grid-text" style="border-right: 1px solid #99d9fa;">需冷类型</view>
				</u-grid-item>
				<u-grid-item>
					<view class="title">{{ chillingRequirementSum }}小时</view>
					<view class="grid-text">总需冷量</view>
				</u-grid-item>
			</u-grid>
			<image src="../../static/result_bg.png" mode=""></image>
		</view>
		
		<view class="btn-group">
			<u-button shape="circle" :custom-style="start" @click="restart">继续评测</u-button>
			<u-button shape="circle" :custom-style="back" plain @click="goHome">返回首页</u-button>
		</view>
		<view class="home-tips">
			<view class="tip-title">
				温馨提示：
			</view>
			<view class="tip-content">
				1、需冷量高于1000h，为长需冷量品种；需冷量在800-1000h之间，为中长需冷量的品种；需冷量在400-800h之间，为中低需冷量品种；需冷量在400h，为低需冷量的品种。<br />
				2、起始日期：梨树需冷量评价模型为≤7.2℃模型。具体就是指自然休眠结束时经历7.2℃以下低温的小时数，以秋季日平均温度稳定通过7.2℃（连续3天）的日期为有效低温累积的起点。<br />
				3、需冷量时间数量的计算：起始日期—终止日期内符合条件的小时数量之和。在上述计算时段内，每天测量记录距离地面1米的气温，整点记录，共记录24次，其中≤7.2℃时，则记录为1小时，大于7.2℃则记录为0。
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			start: {
				background: '#00A1F2 !important',
				color: '#fff',
			},
			back: {
				background: '#fff !important',
				borderColor: '#00A1F2',
				color: '#00A1F2',
			},
			chillingRequirementSum: 0,
			chillingRequirementTypeDesc: null
		}
	},
	onLoad(options) {
		this.chillingRequirementSum = options.chillingRequirementSum
		this.chillingRequirementTypeDesc = options.chillingRequirementTypeDesc
	},
	methods: {
		goHome() {
			this.$u.route({
				type: 'switchTab',
				url: '/pages/index'
			})
		},
		restart() {
			this.$u.route({
				type: 'redirectTo',
				url: '/pages/subPage/statistics'
			})
		}
	}
}
</script>

<style lang="less" scoped>
.statistics {
	background-color: #FFFFFF;
	min-height: 100vh;
}
.resultInfo {
	padding-top: 80rpx;
	background-color: #00A1F2;
	image {
		margin: 32rpx auto 0;
		height: 400rpx;
	}
	.title {
		color: #FFFFFF;
		font-size: 40rpx;
		line-height: 56rpx;
		font-weight: 500;
	}
	.grid-text {
		padding-top: 12rpx;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 44rpx;
		color: #99d9fa;
	}
	.title, .grid-text {
		width: 100%;
		text-align: center;
	}
}
/deep/.u-grid-item {
	background-color: #00A1F2 !important;
}
.home-tips {
	padding: 48rpx;
	font-size: 24rpx;
	color: #333333;
	.tip-content {
		line-height: 40rpx;
		opacity: 0.6;
		padding-top: 24rpx;
		text-align: justify;
	}
}

.btn-group {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 80rpx 48rpx 0;
	u-button {
		width: 48%;
	}
	/deep/.u-btn {
		font-size: 36rpx;
		height: 96rpx;
		line-height: 96rpx;
	}
}
</style>
